Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMDevice: Remove need for _CRT_SECURE_NO_WARNINGS #438

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

marktsuchida
Copy link
Member

That is, remove use of strcpy(), strncpy(), and getenv().

Replace str[n]cpy() with snprintf(). Add tests in the case of CDeviceUtils::CopyLimitedString() (previous implementation had a bug where it didn't null-terminate if the source string was exactly MM::MaxStrLength - 1 chars long).

The use of getenv() was dead code, so remove entirely.

@marktsuchida marktsuchida force-pushed the mmdevice-crt-secure-warnings branch from 5a04449 to 43ad126 Compare January 25, 2024 00:34
That is, remove use of strcpy(), strncpy(), and getenv().

Replace str[n]cpy() with snprintf(). Add tests in the case of
CDeviceUtils::CopyLimitedString() (previous implementation had a bug
where it didn't null-terminate if the source string was exactly
MM::MaxStrLength - 1 chars long).

The use of getenv() was dead code, so remove entirely.
@marktsuchida marktsuchida force-pushed the mmdevice-crt-secure-warnings branch from 43ad126 to ef695e4 Compare January 25, 2024 00:41
@marktsuchida marktsuchida merged commit 1aa373b into main Jan 25, 2024
3 checks passed
@marktsuchida marktsuchida deleted the mmdevice-crt-secure-warnings branch January 25, 2024 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant